﻿Imports CalificadorPremiosOscarUtilidades.formularios

Public Class TipoInicioSesion

    Private Sub TipoInicioSesion_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        FormUtilerias.asignarToolTip(Me.ToolTipInicioSesion, Me.ButtonIrAVoto, "Ingrese y vote por sus favoritos")
        FormUtilerias.asignarToolTip(Me.ToolTipInicioSesion, Me.ButtonIrAdmon, "Ingreso para administradores de la aplicacion")
    End Sub

    Private Sub ButtonIrAdmon_Click(sender As System.Object, e As System.EventArgs) Handles ButtonIrAdmon.Click
        FormUtilerias.deshabilitarControles(Me.ButtonIrAVoto, Me.ButtonIrAdmon)
        Dim form As LoginForm = FormulariosFactory.crearLogin(Me.MdiParent, True)
        form.Text = form.Text & " - Administrador"
        form.LogoPictureBox.Image = My.Resources.administration
        form.Show()
        Me.Close()
    End Sub

    Private Sub ButtonIrAVoto_Click(sender As System.Object, e As System.EventArgs) Handles ButtonIrAVoto.Click
        FormUtilerias.deshabilitarControles(Me.ButtonIrAVoto, Me.ButtonIrAdmon)
        Dim form As LoginForm = FormulariosFactory.crearLogin(Me.MdiParent, False)
        form.Text = form.Text & " - Votación"
        form.LogoPictureBox.Image = My.Resources.movie
        form.Show()
        Me.Close()
    End Sub

    Private Sub ButtonSalir_Click(sender As System.Object, e As System.EventArgs) Handles ButtonSalir.Click
        Me.MdiParent.Close()
    End Sub
End Class